layui.use(['form'], function(){

	var form = layui.form;

	//监听提交
	form.on('submit(ok)', function(data){
		var url = "/logic/logic_email_info/save";
		return CommonUtil.layuiEditPageSaveOnSubmit(url,data.field,"search");
	});

	//表单验证 value：表单的值、item：表单的DOM对象
	form.verify({
		email: function(value, item){ 
			if(CommonUtil.isEmpty(value)){
				return '邮箱地址不能为空';
			}
			if(value.length > 200){
				return '邮箱地址长度必须小于200';
			}
		},
		name: function(value, item){ 
			if(CommonUtil.isEmpty(value)){
				return '姓名不能为空';
			}
			if(value.length > 100){
				return '姓名长度必须小于100';
			}
		},
	});  
});